package com.spbdx.system.service.impl;

import com.spbdx.common.utils.DateUtils;
import com.spbdx.system.domain.EventOrder;
import com.spbdx.system.mapper.EventOrderMapper;
import com.spbdx.system.service.IEventOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author cms
 * @date 2024-08-06
 */
@Service
public class EventOrderServiceImpl implements IEventOrderService
{
    @Autowired
    private EventOrderMapper eventOrderMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param orderId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public EventOrder selectEventOrderByOrderId(Long orderId)
    {
        return eventOrderMapper.selectEventOrderByOrderId(orderId);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param eventOrder 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<EventOrder> selectEventOrderList(EventOrder eventOrder)
    {
        return eventOrderMapper.selectEventOrderList(eventOrder);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param eventOrder 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertEventOrder(EventOrder eventOrder)
    {
        eventOrder.setCreateTime(DateUtils.getNowDate());
        return eventOrderMapper.insertEventOrder(eventOrder);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param eventOrder 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateEventOrder(EventOrder eventOrder)
    {
        eventOrder.setUpdateTime(DateUtils.getNowDate());
        return eventOrderMapper.updateEventOrder(eventOrder);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param orderIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteEventOrderByOrderIds(Long[] orderIds)
    {
        return eventOrderMapper.deleteEventOrderByOrderIds(orderIds);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param orderId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteEventOrderByOrderId(Long orderId)
    {
        return eventOrderMapper.deleteEventOrderByOrderId(orderId);
    }
}